package org.xq.shop.maxaishop.controller;

import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.xq.shop.maxaishop.entity.XqRule;
import org.xq.shop.maxaishop.service.XqRuleService;

import javax.annotation.Resource;

/**
 * (XqRule)表控制层
 *
 * @author makejava
 * @since 2021-07-06 11:24:35
 */
@RestController
@RequestMapping("xqRule")
public class XqRuleController {
    /**
     * 服务对象
     */
    @Resource
    private XqRuleService xqRuleService;

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @ApiOperation("根据主键查询规则")
    @ApiImplicitParam(name = "id", value = "地址id", required=true,paramType="query" )
    @GetMapping("selectOne")
    public XqRule selectOne(Integer id) {
        return this.xqRuleService.queryById(id);
    }

}
